<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><?php echo $this->_langs['webname'];?></title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="format-detection" content="telephone=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="alternate icon" type="image/png" href="<?php echo APP_PUBLIC;?>assets/i/wisdom.jpg">
  <link rel="stylesheet" href="<?php echo APP_PUBLIC;?>assets/css/amazeui.min.css"/>
 <style>
    @media only screen and (min-width: 641px) {
      .am-offcanvas {
        display: block;
        position: static;
        background: none;
      }

      .am-offcanvas-bar {
        position: static;
        width: auto;
        background: none;
        -webkit-transform: translate3d(0, 0, 0);
        -ms-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
      }
      .am-offcanvas-bar:after {
        content: none;
      }

    }
    
    @media only screen and (max-width: 640px) {
      .am-offcanvas-bar .am-nav>li>a {
        color:#ccc;
        border-radius: 0;
        border-top: 1px solid rgba(0,0,0,.3);
        box-shadow: inset 0 1px 0 rgba(255,255,255,.05)
      }

      .am-offcanvas-bar .am-nav>li>a:hover {
        background: #404040;
        color: #fff
      }

      .am-offcanvas-bar .am-nav>li.am-nav-header {
        color: #777;
        background: #404040;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
        text-shadow: 0 1px 0 rgba(0,0,0,.5);
        border-top: 1px solid rgba(0,0,0,.3);
        font-weight: 400;
        font-size: 75%
      }

      .am-offcanvas-bar .am-nav>li.am-active>a {
        background: #1a1a1a;
        color: #fff;
        box-shadow: inset 0 1px 3px rgba(0,0,0,.3)
      }

      .am-offcanvas-bar .am-nav>li+li {
        margin-top: 0;
      }
    }

    .my-head {
      margin-top: 40px;
      text-align: center;
    }

    .my-button {
      position: fixed;
      top: 0;
      right: 0;
      border-radius: 0;
    }
    .my-sidebar {
      padding-right: 0;
      border-right: 1px solid #eeeeee;
    }

    .my-footer {
      border-top: 1px solid #eeeeee;
      padding: 10px 0;
      margin-top: 10px;
      text-align: center;
    }
  </style>
</head>
<body>

<header class="am-g my-head">
  <div class="am-u-sm-12 am-article">
    <h1 class="am-article-title">Wisdom-PHP框架简介</h1>
    <p class="am-article-meta">wisdom</p>
  </div>
</header>
<hr class="am-article-divider"/>
<div class="am-g am-g-fixed">
  <div class="am-u-md-9 am-u-md-push-3">
    <div class="am-g">
      <div class="am-u-sm-11 am-u-sm-centered">
        <div class="am-cf am-article">
	  <a id="l1"></a>
          <div class="am-align-left">
            <img src="<?php echo APP_PUBLIC;?>assets/i/wisdom.jpg" alt="" width="240">
          </div>
          <div>
          </div>
          <p>Wisdom-PHP</p>
          <p>现阶段由 控制器+模板文件组成  方法含：控制器加载，数据库实例化，参数获取并过滤 驱动类库含：模板解析类+MYSQLI</p><br/>
	  <p>目标阶段一：将加入 图片上传类库，缓存类库，验证码类库，非关系型数据库：mongodb驱动库</p>
	  <p>目标阶段二：将加入 数据库生成类库，控制器生成类库，项目生成类库，生成控制后台</p>
	  <p>目标阶段三：将加入 js控制类库：便捷使用sae等js库，一键式生成API接口：数据全转换</p>
          <blockquote>本框架持续完善开发中。</blockquote>
          <hr class="am-article-divider">
	  <a id="l2"></a>
	  <h2>文件目录</h2>
	  <p>app：  项目文件</p>
          <p>cache：缓存文件</p>
	  <p>install：安装文件</p>
          <p>templates_c:模板缓存文件</p>
	  <p>wisdom:核心文件</p>
	  <p>index.php:入口文件</p>
          <hr class="am-article-divider">
	  <a id="l3"></a>
          <h2>基本访问</h2>
	  <p>项目文件：  app/项目名</p>
          <p>访问：  域名/index.php?g=项目名＆m=控制器名（类名)&a=方法名  默认为:g=Home&m=Index&a=index</p>
	  <p>配置文件： app/项目名/conf/data.config.class</p>
          <p>语言文件: app/项目名/language/common.xml(项目全局）   /类名.xml（控制器下）</p>
	　　<hr　class="am-article-divider">
	  <a id="l4"></a>
          <h2>开发相关</h2>
          <h3>控制器（control)　class 类名 extend Action</h3>
          <p>public function 方法名(){
		}</p>
          <h3>数据库操作</h3>
		<p>$demo_mod	= M('table');//不含前缀</p>
		<p>$demo_mod->where('id>10')->order('id ACES')->limit(1,10)->find();//查询:where(条件)->order(排序)->limit(记录数)->find();</p>
		<p>$demo_mod->add($data);//插入：$data  数组  例 $data = array('name'=>'wisdom','pwd'=>'a123456');返回插入后的id(自增主键）</p>
		<p>$demo_mod->where('id=10')->save($data);//修改</p>
		<p>$demo_mod->where('id=10')->delete();//删除;（不推荐使用）</p>
	  <h3>模板赋值与加载</h3>
		<p>赋值：$this->assign(key,value);<br/>
		代码：	$this->assign('bool',true);<br/>
			$this->assign('var','var');<br/>
			$this->assign('color',array('red','green','blue'));
		</p><p>
		加载：$this->display(file.html);<br/>
		代码：	$this->display('index.html');<br/>
		代码：	$this->display('/Index/index.html');</p>
	  <h3>静态模板（目录：APP/HOME/VIEW/Index/）</h3>
		<p>
		<h4>变量:</h4>
		代码:
		<?php echo $this->_vars['var'];?><br/>
		运行结果：
		var
		</p>
		<p>
		<h4>include:</h4>
		代码:
		<?php echo $this->_vars['include'];?><br/>
		运行结果：将加载index/head.html文件
		更多：file="/footer.html"  file="/public/footer.html"<br/>
		运行结果：将分别加载 view/footer.html  view/public/footer.html
		</p>	
		<p>
		<h4>if语句:</h4>
		代码:
		<?php echo $this->_vars['if'];?><br/>
		运行结果：
		<?php if($this->_vars['bool']){?>
		bool是真<br/>
		<?php }else{?>
		bool是假<br/>
		<?php }?>
		</p>
		<p><h4>foreach语句:</h4>
		代码:
		<?php echo $this->_vars['foreach'];?><br/>
		运行结果：
		<?php foreach($this->_vars['color'] as $key=>$item){?>
		<?php echo $key;?>--<?php echo $item;?><br/>
		<?php }?>
		</p>
<div id="footer">
<p><?php echo $this->_langs['author'];?></p>
</div></p>
          <p><small>欢迎各位大神指点</small></p>
        </div>
        <hr/>
       
      </div>
    </div>
  </div>
  <div class="am-u-md-3 am-u-md-pull-9 my-sidebar" style="position: fixed;left:12%;">
    <div class="am-offcanvas" id="sidebar">
      <div class="am-offcanvas-bar">
        <ul class="am-nav">
          <li><a href="#">Wisdom-php</a></li>
          <li class="am-nav-header">目录</li>
          <li><a href="#l1">简介</a></li>
          <li><a href="#l2">文件目录</a></li>
          <li><a href="#l3">基本访问</a></li>
          <li><a href="#l4">开发相关</a></li>
        </ul>
      </div>
    </div>
  </div>
</div>

<footer class="my-footer">
  <p>wisdom-php<br><small>© Copyright. by the Wisdom.</small></p>
</footer>

<!--[if lt IE 9]>
<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="<?php echo APP_PUBLIC;?>assets/js/polyfill/rem.min.js"></script>
<script src="<?php echo APP_PUBLIC;?>assets/js/polyfill/respond.min.js"></script>
<script src="<?php echo APP_PUBLIC;?>assets/js/amazeui.legacy.js"></script>
<![endif]-->

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="<?php echo APP_PUBLIC;?>assets/js/jquery.min.js"></script>
<script src="<?php echo APP_PUBLIC;?>assets/js/amazeui.min.js"></script>
<!--<![endif]-->
</body>
</html>

